﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.ServiceLocation;

namespace WorkStation.Frameworks.ServiceContainer
{
    public abstract class AbstractServiceContainerProvider : IServiceContainerProvider
    {
        public ServiceContainerConfiguration Config { get; set; }

        public void Init(ServiceContainerConfiguration config)
        {
            if (config.ItemConfigs.Configs.Count == 0)
            {
                throw new Exception("服务容器配置中没有任何配置");
            }

            this.Config = config;
        }

        public abstract IServiceLocator GetServiceContainer();
    }
}
